#ifndef TEXTURE_H
#define TEXTURE_H

#include <string>
#include <iostream>
#include <GL/glew.h>
#include "Export.h"
#include "IResource.h"
#include "Vector2.h"

namespace glow
{
    class SHARED Texture : public IResource
    {
        public :

        /**
         *  Constructor with the file name in parameter
		 *\param filename the name of the image's file
         **/
      Texture(std::string filename);

        /**
         *  Destroy he texture
         **/
      ~Texture();


        /**
		 * Get texture size
		 *\return the size of the texture
		 **/
		const Vector2i &getSize() const;

        /**
         *  Get the texture's data
		 *\return pointer to the texture's data
         **/
        unsigned char *getData() const;

		/**
		 * Get the ident of the texture
		 *\return the ident of the texture 
		 **/
        GLuint getGLID() const;

		/**
		 * Load the file to the data table
		  *\param filename the name of the image's file
		 **/
        void load(std::string filename);

        private :

        /**
         *  Data of the texture
         **/
        unsigned char * _data;

        /**
         *  Data texels of the texture
         **/
        GLuint _idText;

        /**
         *  Size of the texture
         **/
        Vector2i _size;
    };

} //namespace glow

#endif //TEXTURE_H
